<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>
    a:hover {
        color: red;
    }

    .box:hover {
        color: yellow;
    }
</style>

<body>
    <a href="#">鼠标经过超链接变色</a>

    <div class="box">鼠标经过盒子变色</div>
</body>

</html>